package com.ym.medical.dao;

import com.ym.medical.domain.entity.TransactionDetailsEntity;
import com.ym.medical.domain.param.TransactionDetailsParam;
import com.ym.medical.domain.vo.TdDetailSummaryVO;
import com.ym.medical.domain.vo.TransactionDetailsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

/**
 * 仅包含充值/提现交易记录Dao接口
 *
 * @author ym
 * @date 2020-08-24
 */
@Repository
public interface TransactionDetailsDao extends Mapper<TransactionDetailsEntity> {
	/**
	 * 医生体现记录
	 * @param transactionDetailsModel
	 * @return
	 */
	List<TransactionDetailsVo> listDoctorWithdraw(TransactionDetailsParam transactionDetailsModel);

	/**
	 * PC端查询患者的交易明细
	 * @param transactionDetailsModel
	 * @return
	 */
	List<TransactionDetailsVo> listTransactionDetail(TransactionDetailsParam transactionDetailsModel);

	/**
	 * PC端-账务系统 平台账务交易汇总
	 * @param tdType 交易类型 （01-充值 02-提现）
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	TdDetailSummaryVO tdDetailSummary(@Param("tdType") String tdType, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
